#ifndef TOKEN_H
#define TOKEN_H

#include <string>
#include <fstream>

using namespace std;


typedef enum {
    Comment, LBrace, RBrace, LAngle, RAngle, LParen, RParen,
    Comma, Camera, Light, Sphere, Plane, Box, Triangle, Cone,
    Pigment, Color, RGB, RGBF, Finish, Translate, Rotate, Scale,
    Ambient, Diffuse, Specular, Roughness, Reflection, Refraction, IOR,
    Location, Up, Right, LookAt, Eof
} Token;


#ifndef TOKEN_NUM
#define TOKEN_NUM 35
#endif

extern string tokenList[TOKEN_NUM];

//is either a token or a variable (a number for this language)
struct Symbol {
    bool isToken;
    Token t;
    float num;
};

extern Token lookUpToken(string s);
extern string lookUpName(Token t);
extern Symbol matchToken(ifstream &file, Symbol cur, Token match);
extern Symbol nextToken(ifstream &file);


#endif
